package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.ClauseDao;
import com.home.qh.model.Clause;
import com.home.qh.service.ClauseManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("clauseManager")
public class ClauseManagerImpl extends GenericManagerImpl<Clause, Long> implements ClauseManager {
	ClauseDao clauseDao;

    @Autowired
    public ClauseManagerImpl(ClauseDao clauseDao) {
        super(clauseDao);
        this.clauseDao = clauseDao;
    }

	public List<Clause> getClauseByCodeAndName(String clauseCode,
			String clauseName) {
		return clauseDao.getClauseByCodeAndName(clauseCode, clauseName);
	}

	public List<Clause> getClauseByClause(Clause clause, String sort, boolean desc, int startResult, int maxResults) {
		return clauseDao.getClauseByClause(clause, sort, desc, startResult, maxResults);
	}

}